.class public final Lnbisdk/ny;
.super Ljava/lang/Object;


# instance fields
.field private d:Lnbisdk/ov;

.field private tF:Lnbisdk/gd;

.field private tG:Lnbisdk/gd;

.field private tH:Z


# direct methods
.method public constructor <init>()V
    .locals 2

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const-wide/32 v0, 0x2000000

    invoke-static {v0, v1}, Lnbisdk/pn;->k(J)Lnbisdk/ov;

    move-result-object v0

    iput-object v0, p0, Lnbisdk/ny;->d:Lnbisdk/ov;

    const/4 v0, 0x0

    iput-boolean v0, p0, Lnbisdk/ny;->tH:Z

    return-void
.end method


# virtual methods
.method public final declared-synchronized A()V
    .locals 4

    const/4 v3, -0x1

    monitor-enter p0

    :try_start_0
    iget-boolean v0, p0, Lnbisdk/ny;->tH:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v0, :cond_0

    :goto_0
    monitor-exit p0

    return-void

    :cond_0
    :try_start_1
    invoke-static {}, Lnbisdk/ix;->gN()Lnbisdk/ix;

    move-result-object v0

    const/16 v1, 0x10

    invoke-virtual {v0, v1}, Lnbisdk/ix;->au(I)I

    move-result v0

    if-ne v0, v3, :cond_1

    const/16 v0, 0x79

    :cond_1
    invoke-static {}, Lnbisdk/ix;->gN()Lnbisdk/ix;

    move-result-object v1

    const/16 v2, 0x17

    invoke-virtual {v1, v2}, Lnbisdk/ix;->au(I)I

    move-result v1

    if-ne v1, v3, :cond_2

    shl-int/lit8 v1, v0, 0x1

    :cond_2
    if-nez v0, :cond_3

    new-instance v0, Lnbisdk/iu;

    invoke-direct {v0}, Lnbisdk/iu;-><init>()V

    iput-object v0, p0, Lnbisdk/ny;->tF:Lnbisdk/gd;

    :goto_1
    const-string v0, "comnimtm"

    const/4 v2, 0x1

    invoke-static {v0, v2}, Lnbisdk/ap;->b(Ljava/lang/String;Z)Lnbisdk/ap;

    move-result-object v0

    invoke-virtual {v0}, Lnbisdk/ap;->aL()Lnbisdk/ed;

    move-result-object v2

    instance-of v2, v2, Lnbisdk/pk;

    if-eqz v2, :cond_4

    new-instance v2, Lnbisdk/hw;

    invoke-direct {v2, v1, v0}, Lnbisdk/hw;-><init>(ILnbisdk/ap;)V

    iput-object v2, p0, Lnbisdk/ny;->tG:Lnbisdk/gd;

    :goto_2
    const/4 v0, 0x1

    iput-boolean v0, p0, Lnbisdk/ny;->tH:Z
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0

    :cond_3
    :try_start_2
    new-instance v2, Lnbisdk/a;

    new-instance v3, Lnbisdk/cn;

    invoke-direct {v3}, Lnbisdk/cn;-><init>()V

    invoke-direct {v2, v3, v0}, Lnbisdk/a;-><init>(Lnbisdk/ly;I)V

    iput-object v2, p0, Lnbisdk/ny;->tF:Lnbisdk/gd;

    goto :goto_1

    :cond_4
    new-instance v2, Lnbisdk/q;

    new-instance v3, Lnbisdk/si;

    invoke-direct {v3}, Lnbisdk/si;-><init>()V

    invoke-direct {v2, v1, v0}, Lnbisdk/q;-><init>(ILnbisdk/ap;)V

    iput-object v2, p0, Lnbisdk/ny;->tG:Lnbisdk/gd;
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    goto :goto_2
.end method

.method public final a(Ljava/lang/String;Ljava/lang/Object;JZ)V
    .locals 5

    iget-boolean v0, p0, Lnbisdk/ny;->tH:Z

    if-nez v0, :cond_0

    invoke-virtual {p0}, Lnbisdk/ny;->A()V

    :cond_0
    new-instance v0, Lnbisdk/bd;

    invoke-direct {v0, p1, p2}, Lnbisdk/bd;-><init>(Ljava/lang/String;Ljava/lang/Object;)V

    iput-wide p3, v0, Lnbisdk/bd;->cx:J

    iput-boolean p5, v0, Lnbisdk/bd;->cy:Z

    if-nez p5, :cond_1

    iget-object v1, p0, Lnbisdk/ny;->tF:Lnbisdk/gd;

    invoke-interface {v1, v0}, Lnbisdk/gd;->a(Lnbisdk/bd;)V

    :cond_1
    const-wide/16 v1, 0x0

    cmp-long v1, p3, v1

    if-nez v1, :cond_2

    iget-object v1, p0, Lnbisdk/ny;->tG:Lnbisdk/gd;

    invoke-interface {v1, v0}, Lnbisdk/gd;->a(Lnbisdk/bd;)V

    :cond_2
    sget-boolean v0, Lnbisdk/bk;->cG:Z

    if-eqz v0, :cond_3

    invoke-static {}, Lnbisdk/kh;->hG()Lnbisdk/kh;

    move-result-object v0

    iget v1, v0, Lnbisdk/kh;->pl:I

    iget v2, v0, Lnbisdk/kh;->pm:I

    add-int/2addr v1, v2

    iget v2, v0, Lnbisdk/kh;->pl:I

    iget v3, v0, Lnbisdk/kh;->pm:I

    iget v4, v0, Lnbisdk/kh;->pi:I

    iget v0, v0, Lnbisdk/kh;->pn:I

    invoke-static {v1, v2, v3, v4, v0}, Lnbisdk/ef;->a(IIIII)V

    :cond_3
    return-void
.end method

.method public final declared-synchronized clear(Z)V
    .locals 1

    monitor-enter p0

    :try_start_0
    iget-object v0, p0, Lnbisdk/ny;->tF:Lnbisdk/gd;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/ny;->tF:Lnbisdk/gd;

    invoke-interface {v0}, Lnbisdk/gd;->clear()V

    :cond_0
    if-eqz p1, :cond_2

    iget-object v0, p0, Lnbisdk/ny;->tG:Lnbisdk/gd;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/ny;->tG:Lnbisdk/gd;

    invoke-interface {v0}, Lnbisdk/gd;->clear()V

    :cond_1
    const/4 v0, 0x0

    iput-boolean v0, p0, Lnbisdk/ny;->tH:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :cond_2
    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public final declared-synchronized close()V
    .locals 1

    monitor-enter p0

    :try_start_0
    iget-object v0, p0, Lnbisdk/ny;->tG:Lnbisdk/gd;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnbisdk/ny;->tG:Lnbisdk/gd;

    invoke-interface {v0}, Lnbisdk/gd;->close()V

    :cond_0
    iget-object v0, p0, Lnbisdk/ny;->tF:Lnbisdk/gd;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnbisdk/ny;->tF:Lnbisdk/gd;

    invoke-interface {v0}, Lnbisdk/gd;->close()V

    :cond_1
    const/4 v0, 0x0

    iput-boolean v0, p0, Lnbisdk/ny;->tH:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit p0

    return-void

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public final get(Ljava/lang/String;)Ljava/lang/Object;
    .locals 4

    iget-boolean v0, p0, Lnbisdk/ny;->tH:Z

    if-nez v0, :cond_0

    invoke-virtual {p0}, Lnbisdk/ny;->A()V

    :cond_0
    iget-object v0, p0, Lnbisdk/ny;->tF:Lnbisdk/gd;

    invoke-interface {v0, p1}, Lnbisdk/gd;->a(Ljava/lang/String;)Lnbisdk/bd;

    move-result-object v0

    sget-boolean v1, Lnbisdk/bk;->DEBUG:Z

    if-eqz v1, :cond_1

    if-eqz v0, :cond_1

    iget-object v1, p0, Lnbisdk/ny;->d:Lnbisdk/ov;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "From MemCache: "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lnbisdk/ov;->info(Ljava/lang/String;)V

    :cond_1
    if-nez v0, :cond_3

    iget-object v0, p0, Lnbisdk/ny;->d:Lnbisdk/ov;

    const-string v1, "Cache get trying db"

    invoke-virtual {v0, v1}, Lnbisdk/ov;->info(Ljava/lang/String;)V

    iget-object v0, p0, Lnbisdk/ny;->tG:Lnbisdk/gd;

    invoke-interface {v0, p1}, Lnbisdk/gd;->a(Ljava/lang/String;)Lnbisdk/bd;

    move-result-object v0

    sget-boolean v1, Lnbisdk/bk;->DEBUG:Z

    if-eqz v1, :cond_2

    if-eqz v0, :cond_2

    iget-object v1, p0, Lnbisdk/ny;->d:Lnbisdk/ov;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "From PersistentCache: "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lnbisdk/ov;->info(Ljava/lang/String;)V

    :cond_2
    if-eqz v0, :cond_3

    iget-boolean v1, v0, Lnbisdk/bd;->cy:Z

    if-nez v1, :cond_3

    iget-object v1, p0, Lnbisdk/ny;->tF:Lnbisdk/gd;

    invoke-interface {v1, v0}, Lnbisdk/gd;->a(Lnbisdk/bd;)V

    :cond_3
    if-eqz v0, :cond_4

    iget-object v0, v0, Lnbisdk/bd;->cu:Ljava/lang/Object;

    :goto_0
    return-object v0

    :cond_4
    const/4 v0, 0x0

    goto :goto_0
.end method
